package com.rcadmin.core.jpa;

import java.util.List;

import com.rcadmin.core.jpa.util.PageBean;

public interface BaseDao {
	public void delete(Object entity);

	public int executeSql(String sql);

	public <T> List<T> findAll(Class<T> entityClass);
	
	public <T> List<T> find(String condition, Class<T> entityClass);

	public <T> T findOne(Integer id, Class<T> entityClass);

	public <T> T findOne(String condition, Class<T> entityClass);

	public <T> PageBean<T> pageQuery(String condition, String orderBy,
			Integer pageSize, Integer page, Class<T> entityClass);

	public void save(Object entity);

	public void update(Object entity);

}